Selection from heaps, row-sorted matrices and X+Y using soft heaps

نویسندگان

  • Haim Kaplan
  • László Kozma
  • Or Zamir
  • Uri Zwick
چکیده

We use soft heaps to obtain simpler optimal algorithms for selecting the k-th smallest item, and the set of k smallest items, from a heap-ordered tree, from a collection of sorted lists, and from X + Y , where X and Y are two unsorted sets. Our results match, and in some ways extend and improve, classical results of Frederickson (1993) and Frederickson and Johnson (1982). In particular, for selecting the k-th smallest item, or the set of k smallest items, from a collection of m sorted lists we obtain a new optimal “output-sensitive” algorithm that performs only O(m+ ∑m i=1 log(ki + 1)) comparisons, where ki is the number of items of the i-th list that belong to the overall set of k smallest items.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

A simpler implementation and analysis of Chazelle's soft heaps

Chazelle (JACM 47(6), 2000) devised an approximate meldable priority queue data structure, called Soft Heaps, and used it to obtain the fastest known deterministic comparison-based algorithm for computing minimum spanning trees, as well as some new algorithms for selection and approximate sorting problems. If n elements are inserted into a collection of soft heaps, then up to εn of the elements...

متن کامل

Two-way Replacement Selection

The performance of external sorting using merge sort is highly dependent on the length of the runs generated. One of the most commonly used run generation strategies is Replacement Selection (RS) because, on average, it generates runs that are twice the size of the memory available. However, the length of the runs generated by RS is downsized for data with certain characteristics, like inputs s...

متن کامل

Nonlinear elasticity of microsphere heaps.

Thermal fluctuations, geometric exclusion, and external driving all govern the mechanical response of dense particulate suspensions. Here, we measure the stress-strain response of quasi-two-dimensional flow-stabilized microsphere heaps in a regime in which all three effects are present using a microfluidic device. We observe that the elastic modulus and the mean interparticle separation of the ...

متن کامل

Automated Analysis of Data-Dependent Programs with Dynamic Memory

We present a new approach for automatic verification of data-dependent programs manipulating dynamic heaps. A heap is encoded by a graph where the nodes represent the cells, and the edges reflect the pointer structure between the cells of the heap. Each cell contains a set of variables which range over the natural numbers. Our method relies on standard backward reachability analysis, where the ...

متن کامل

Automatic Verification of Dynamic Data-Dependent Programs

We present a new approach for automatic verification of data-dependent programs manipulating dynamic heaps. A heap is encoded by a graph where the nodes represent the cells, and the edges reflect the pointer structure between the cells of the heap. Each cell contains a set of variables which range over the natural numbers. Our method relies on standard backward reachability analysis, where the ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • CoRR

دوره abs/1802.07041  شماره 

صفحات  -

تاریخ انتشار 2018